<?php

namespace App\Http\Controllers\Blog;

use App\Http\Controllers\Controller;
use App\Models\Note\Doc;
use Illuminate\Http\Request;

class DocController extends Controller
{
    public function index(Request $request)
    {
        $obj = Doc::orderBy('created_at', 'desc')->paginate($request->input('page_size', 25));
        return $this->response($obj);
    }

    public function view($id)
    {
        $obj = Doc::find($id);
        return $this->response($obj);
    }
}
